Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new feature to enable creation of new activities (#539) #554

Merged
merged 3 commits into from
Feb 6, 2023

Conversation

tuxology
Copy link
Member

@tuxology tuxology commented Feb 4, 2023

Contains final PR of all features developed by @souad988 Closes #205

  • Create activity reducer with initial state for all activities

  • Create activity actions file with setActivities function

  • Update configureStore to include activityReducer

  • Created a generic activities objects to use meanwhile creating backend for activities

  • Create Activities component and add button in header to render it

  • Connect activities component to activities store

  • Create action types constants

  • Remove unused files

  • Create activities video carousel

  • Create activities video carousel

  • Create activity card

  • Add projects count icon and activity tags to the card

  • Add creator to activity card

  • Create creator component to handle multipe activity creator case and display them in activity card

  • Show full creator image on hover

  • Ajust activity cards and handle display of more than 3 tags

  • Create activity creation form container

  • Create form steps components and form progressBar

  • Add translation for BROWS ACTIVITIES Button

  • Create reusable dynamic progress bar

  • Create activity creation step1 form

  • Create create activity step 2 form inputs

  • Create separate component for react quill text fields

  • Create AddMore and MaterialsUsed component

  • Add handleOnChange an on blur for materials used inputs

  • Create formLabel and UploadFile components

  • Add validation to step1 fields

  • Create step3 input blocks

  • Add form steps verification

  • Add defaultValue to input and inputText to display values entered when checking back previous steps

  • Add handleImageChange to handle all fileUpload instances and fix form responsiveness issues

  • Add validation to fields accepting images and Create upload image functionality

  • Add at least one material required validation for materialsUsed array field

  • Fix inspiringExemplesImages append files issue

  • Try to fix appending multiple inspiringExemplesImages images to newActivity state by adding keys to uploadFiles component instances and add promise to set state

  • Create separate states for step verifiedStep and newActivity and use name instead of label in IputText and send only required props as parameter

  • Update InputText and Input components and according script functions to accept only needed props

  • Update materialsUsed and all other fields using Input and InputText components and make them update form state correctly

  • Update UploadFiles and uploadFile scripts to accept the new states and handle multiple inputs feeding same field in the state issue

  • Upload images to local and setNewActivityObject with urls

  • Handle video change on uploadFile

  • Fix inspiringExemplesImages files_to_upload issue to upload correctly

  • updateState with formik file values on form submit

  • Add hided submitButton with ref and click on setState from refactorNewActivityObject to upload files after state is updated

  • Create activities app backend

  • Create activities app

  • Add materials_udes_image field to activity model

  • Add category and add order to making steps

  • Add inspiring artists

  • started updating handleFileFieldChange

  • Add inspired_from_activity field to Project model and run migrations

  • Create UploadMedia and FileField classes to handle file input changes

  • Add inputLabel to display label in inputs not having FormLabel and Add artist full name input to artist section

  • Move upload media to uploadFileScript and Change it to return promise and create appendFile to field for file field accepting multiple files

  • Create activity serializers and ListAPIView

  • Create activity serializers create method and combine fields data for nested objects in createActivityScripts

  • Add creator to created activity

  • Fixing input value undefined

  • Fix styled-components package import issue

  • Refactor activity object returned from backend to fit form fields for edit and Add redirection and routes for activity edit

  • Fix Input and InputText display value from state issue

  • Create map of field names and activity object attribute to help deserialize and display data in the form for edit

  • Successfully Update activity and all related fields

  • Fix delete activity issue and add loading to activities veiw

  • Remove commented code from activities view

  • Fix refresh activities list after delete and update issue by using useSelector hook instead of reading reducer state from props

  • Fix Display InputText errors issue

  • Remove prev selected files if new files have errors and display error

  • Add preview image feature to UploadFile component

  • Add preview image to UploadFile component

  • Preview image delete works, add validation for activity images on update when deleting all urls

  • Fix activity without unrequired fields creation issue by removing field keys from api object instead of sending empty objects

  • Changed all form state to be handled by formik including array of objects fields and updated create activity

  • Update step verification to verify step when required field provided with no error and let user see msgs

  • Add function to fill form from activity object and call update activity

  • User stats enhancement (User stats enhancement #505)

  • Use same border radius for next and prev buttons

  • refactor button border radius code

  • reverted master

  • user's profile header refactor

  • Revert "User stats enhancement (User stats enhancement #505)" (Revert "User stats enhancement" #527)

This reverts commit 4aa7cc1.

  • User stats redesign (User stats redesign #526)

  • Use same border radius for next and prev buttons

  • refactor button border radius code

  • reverted master

  • user stats restructure

  • patch to handle longusernames

Co-authored-by: Deepanshu039 deepanshu.17220@knit.ac.com

  • update and create working with no issues after refactor

  • Activitylog feature (Activitylog feature #523)

  • Use same border radius for next and prev buttons

  • refactor button border radius code

  • reverted master

  • activitylog feature to keep the track of user's activity

  • patch after #1st review

  • migration files of activity-log

  • react-icons package used in activity-log

  • package-lock file with minimal changes

Co-authored-by: Deepanshu039 deepanshu.17220@knit.ac.com

Co-authored-by: Ndibe Raymond Olisaemeka rolisaemeka-ctr@wikimedia.org

the heap out of memory problem

Co-authored-by: Ndibe Raymond Olisaemeka rolisaemeka-ctr@wikimedia.org

This reverts commit 9444c3f.

  • Use formik field Array to display making steps and inspiring examples and fix all update issues now creation and update working correctly

  • Badge titles on user's profile (Badge titles on user's profile #524)

  • Use same border radius for next and prev buttons

  • refactor button border radius code

  • reverted master

  • automated and custom badges on user's profile

  • initially populate badges table

  • zubhub authentication feature backend and frontend #1 patch after review

  • feature: change original badge title from admin panel

  • migration file of badge table

Co-authored-by: Deepanshu039 deepanshu.17220@knit.ac.com

  • Add empty object validation and file compression

  • Handle video validation Upload and preview by UploadFile component

  • Add save activity functionality and first section of activity details view

  • Add verification on clicking next button

  • Fix video url preview and empty url issues

  • Add regex to validate video urls

  • Use iframe for video url previews and to read videos in activity details view

  • Add pdf creation component

  • Add generate pdf of activity and style activity detail view

  • commit pdfStyle and scripts

  • merged remote master

  • Add build project based on activity functionality

  • Add breadCrumb nav

  • Fix styling issues

  • Redirect user to activity_details after creation or edit

  • handle error comming from server and add permission restrictions

  • restyle pdf

  • Restrict activity creation to educators staff and moderators

  • Display inspired_projects count in activity cards

  • Add toggle publish functionality and fix activity details style issues

  • Fix making steps empty object validation

  • Add hindi missing transaltion to activity form

  • Restyle linked projects count in activity card

  • Fix activity details quill editor styling

  • Add footer to pdf

  • Add visited links to breadCrumb

  • Change breadCrumb separators

  • Fix validation max values and updated translation properties accordingly

  • Display only published activities to non staff or moderator users

  • Add condition before displaying store variables to fix oppening on firefox issue

  • Update breadCrumb to handle all links creators projects and activities

  • Add Create Activity link and Update href to react router Links in humbergerMenu

  • Add my activities and unpublished activities links to profile menu

  • Remove unbreakable from making steps block on pdf and put activity_id in params instead of url in project create

  • Fix empty height space generated by react quill on firefox

  • Fix images preview stretch issue

  • Add upload progress

  • Fix breadCrumbs default redirection to projects issue

  • Increase activity form title weight

  • Capitalize breadCumbs Links

  • Decrease breadCrumbs Links font weigth

  • Change activity cards LinkedProjects pill text color and make count number bolder

  • Create api endpoints and dispatchers to fetch published unPublished and userActivities

  • Add making steps order and list dots to materials required

  • Add link to activity from pdf

  • Remove prints and console logs

  • Capitalize input labels of activity creation form

  • Make breadCrumbs navBar stick to top when scrolling down

  • Change activity text and titles color to black to follow projects style

  • Add link to activity creator profile from created on date in activity details view

  • Render error page if activity list is empty

  • Move breadCrumbs navbar into header to have fixed position

  • Update breadCrumbs navBar to properly display routes

  • Update activities view to fetch data from api and display loading meanwhile

  • merge remote master

  • Add changes

  • update pdfmake

  • Add linked_projects component

  • Add activity linked projects view and link

  • Call upload file to DO

  • updated upload to DO and upload video to cloudinary but still need review and test from Raymond


Co-authored-by: Deepanshu Gautam 92849065+Deepanshu039@users.noreply.github.com
Co-authored-by: Suchakra Sharma suchakra@unstructured.studio
Co-authored-by: Deepanshu039 deepanshu.17220@knit.ac.com
Co-authored-by: Ndibe Raymond Olisaemeka NdibeRaymond1@gmail.com
Co-authored-by: Ndibe Raymond Olisaemeka rolisaemeka-ctr@wikimedia.org

* Create activity reducer with initial state for all activities

* Create activity actions file with setActivities function

* Update configureStore to include activityReducer

* Created a generic activities objects to use meanwhile creating backend for activities

* Create Activities component and add button in header to render it

* Connect activities component to activities store

* Create action types constants

* Remove unused files

* Create activities video carousel

* Create activities video carousel

* Create activity card

* Add projects count icon and activity tags to the card

* Add creator to activity card

* Create creator component to handle multipe activity creator case and display them in activity card

* Show full creator image on hover

* Ajust activity cards and handle display of more than 3 tags

* Create activity creation form container

* Create form steps components and form progressBar

* Add translation for BROWS ACTIVITIES Button

* Create reusable dynamic progress bar

* Create activity creation step1 form

* Create create activity step 2 form inputs

* Create separate component for react quill text fields

* Create AddMore and MaterialsUsed component

* Add handleOnChange an on blur for materials used inputs

* Create formLabel and UploadFile components

* Add validation to step1 fields

* Create step3 input blocks

* Add form steps verification

* Add defaultValue to input and inputText to display values entered when checking back previous steps

* Add handleImageChange to handle all fileUpload instances and fix form responsiveness issues

* Add validation to fields accepting images and Create upload image functionality

* Add at least one material required validation for materialsUsed array field

* Fix inspiringExemplesImages append files issue

* Try to fix appending multiple inspiringExemplesImages images to newActivity state by adding keys to uploadFiles component instances and add promise to set state

* Create separate states for step verifiedStep and newActivity and use name instead of label in IputText and send only required props as parameter

* Update InputText and Input components and according script functions to accept only needed props

* Update materialsUsed and all other fields using Input and InputText components and make them update form state correctly

* Update UploadFiles and uploadFile scripts to accept the new states and handle multiple inputs feeding same field in the state issue

* Upload images to local and setNewActivityObject with urls

* Handle video change on uploadFile

* Fix inspiringExemplesImages files_to_upload issue to upload correctly

* updateState with formik file values on form submit

* Add hided submitButton with ref and click on setState from refactorNewActivityObject to upload files after state is updated

* Create activities app backend

* Create activities app

* Add materials_udes_image field to activity model

* Add category and add order to making steps

* Add inspiring artists

* started updating handleFileFieldChange

* Add inspired_from_activity field to Project model and run migrations

* Create UploadMedia and FileField classes to handle file input changes

* Add inputLabel to display label in inputs not having FormLabel and Add artist full name input to artist section

* Move upload media to uploadFileScript and Change it to return promise and create appendFile to field for file field accepting multiple files

* Create activity serializers and ListAPIView

* Create activity serializers create method and combine fields data for nested objects in createActivityScripts

* Add creator to created activity

* Fixing input value undefined

* Fix styled-components package import issue

* Refactor activity object returned from backend to fit form fields for edit and Add redirection and routes for activity edit

* Fix Input and InputText display value from state issue

* Create map of field names and activity object attribute to help deserialize and display data in the form for edit

* Successfully Update activity and all related fields

* Fix delete activity issue and add loading to activities veiw

* Remove commented code from activities view

* Fix refresh activities list after delete and update issue by using useSelector hook instead of reading reducer state from props

* Fix Display InputText errors issue

* Remove prev selected files if new files have errors and display error

* Add preview image feature to UploadFile component

* Add preview image to UploadFile component

* Preview image delete works, add validation for activity images on update when deleting all urls

* Fix activity without unrequired fields creation issue by removing field keys from api object instead of sending empty objects

* Changed all form state to be handled by formik including array of objects fields and updated create activity

* Update step verification to verify step when required field provided with no error and let user see msgs

* Add function to fill form from activity object and call update activity

* User stats enhancement (#505)

* Use same border radius for next and prev buttons

* refactor button border radius code

* reverted master

* user's profile header refactor

* Revert "User stats enhancement (#505)" (#527)

This reverts commit 4aa7cc1.

* User stats redesign (#526)

* Use same border radius for next and prev buttons

* refactor button border radius code

* reverted master

* user stats restructure

* patch to handle longusernames

Co-authored-by: Deepanshu039 <deepanshu.17220@knit.ac.com>

* update and create working with no issues after refactor

* Activitylog feature (#523)

* Use same border radius for next and prev buttons

* refactor button border radius code

* reverted master

* activitylog feature to keep the track of user's activity

* patch after #1st review

* migration files of activity-log

* react-icons package used in activity-log

* package-lock file with minimal changes

Co-authored-by: Deepanshu039 <deepanshu.17220@knit.ac.com>

* add --max_old_space_size=4096 to react-script options in package.json (#529)

Co-authored-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>

* add GENERATE_SOURCEMAP=false to .env file to solve (#530)

the heap out of memory problem

Co-authored-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>

* Revert "add --max_old_space_size=4096 to react-script options in package.json (#529)" (#531)

This reverts commit 9444c3f.

* Use formik field Array to display making steps and inspiring examples and fix all update issues now creation and update working correctly

* Badge titles on user's profile (#524)

* Use same border radius for next and prev buttons

* refactor button border radius code

* reverted master

* automated and custom badges on user's profile

* initially populate badges table

* #1 patch after review

* feature: change original badge title from admin panel

* migration file of badge table

Co-authored-by: Deepanshu039 <deepanshu.17220@knit.ac.com>

* Add  empty object validation and file compression

* Handle video validation Upload and preview by UploadFile component

* Add save activity functionality and first section of activity details view

* Add verification on clicking next button

* Fix video url preview and empty url issues

* Add regex to validate video urls

* Use iframe for video url previews and to read videos in activity details view

* Add pdf creation component

* Add generate pdf of activity and style activity detail view

* commit pdfStyle and scripts

* merged remote master

* Add build project based on activity functionality

* Add breadCrumb nav

* Fix styling issues

* Redirect user to activity_details after creation or edit

* handle error comming from server and add permission restrictions

* restyle pdf

* Restrict activity creation to educators staff and moderators

* Display inspired_projects count in activity cards

* Add toggle publish functionality and fix activity details style issues

* Fix making steps empty object validation

* Add hindi missing transaltion to activity form

* Restyle linked projects count in activity card

* Fix activity details quill editor styling

* Add footer to pdf

* Add visited links to breadCrumb

* Change breadCrumb separators

* Fix validation max values and updated translation properties accordingly

* Display only published activities to non staff or moderator users

* Add condition before displaying store variables to fix oppening on firefox issue

* Update breadCrumb to handle all links creators projects and activities

* Add Create Activity link and Update href to react router Links in humbergerMenu

* Add my activities and unpublished activities links to profile menu

* Remove unbreakable from making steps block on pdf and put activity_id in params instead of url in project create

* Fix empty height space generated by react quill on firefox

* Fix images preview stretch issue

* Add upload progress

* Fix breadCrumbs default redirection to projects issue

* Increase activity form title weight

* Capitalize breadCumbs Links

* Decrease breadCrumbs Links font weigth

* Change activity cards LinkedProjects pill text color and make count number bolder

* Create api endpoints and dispatchers to fetch published unPublished and userActivities

* Add making steps order and list dots to materials required

* Add link to activity from pdf

* Remove prints and console logs

* Capitalize input labels of activity creation form

* Make breadCrumbs navBar stick to top when scrolling down

* Change activity text and titles color to black to follow projects style

* Add link to activity creator profile from created on date in activity details view

* Render error page if activity list is empty

* Move breadCrumbs navbar into header to have fixed position

* Update breadCrumbs navBar to properly display routes

* Update activities view to fetch data from api and display loading meanwhile

* merge remote master

* Add changes

* update pdfmake

* Add linked_projects component

* Add activity linked projects view and link

* Call upload file to DO

* updated upload to DO and upload video to cloudinary but still need review and test from Raymond

---------

Co-authored-by: Deepanshu Gautam <92849065+Deepanshu039@users.noreply.github.com>
Co-authored-by: Suchakra Sharma <suchakra@unstructured.studio>
Co-authored-by: Deepanshu039 <deepanshu.17220@knit.ac.com>
Co-authored-by: Ndibe Raymond Olisaemeka <NdibeRaymond1@gmail.com>
Co-authored-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
@tuxology tuxology merged commit 859adf7 into master Feb 6, 2023
@tuxology tuxology deleted the activities-release-1 branch September 29, 2023 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow creation of learning activities on ZubHub web app
2 participants